package com.tencent.mm.opensdk.modelmsg;

import android.os.Bundle;
import android.util.Log;
import com.tencent.mm.opensdk.b.d;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage.IMediaObject;

public class WXEmojiPageSharedObject implements IMediaObject {
    private static final String TAG = "MicroMsg.SDK.WXEmojiSharedObject";
    public String desc;
    public String iconUrl;
    public int pageType;
    public String secondUrl;
    public int tid;
    public String title;
    public int type;
    public String url;

    public WXEmojiPageSharedObject() {

    }

    public WXEmojiPageSharedObject(int arg1, int arg2, String arg3, String arg4, String arg5, String arg6, int arg7, String arg8) {

        this.tid = arg2;
        this.title = arg3;
        this.desc = arg4;
        this.iconUrl = arg5;
        this.secondUrl = arg6;
        this.pageType = arg7;
        this.url = arg8;
        this.type = arg1;
    }

    public boolean checkArgs() {
        boolean v0;
        if((d.a(this.title)) || (d.a(this.iconUrl))) {
            Log.e("MicroMsg.SDK.WXEmojiSharedObject", "checkArgs fail, title or iconUrl is invalid");
            v0 = false;
        }
        else {
            v0 = true;
        }

        return v0;
    }

    public void serialize(Bundle arg3) {
        arg3.putInt("_wxemojisharedobject_tid", this.tid);
        arg3.putString("_wxemojisharedobject_title", this.title);
        arg3.putString("_wxemojisharedobject_desc", this.desc);
        arg3.putString("_wxemojisharedobject_iconurl", this.iconUrl);
        arg3.putString("_wxemojisharedobject_secondurl", this.secondUrl);
        arg3.putInt("_wxemojisharedobject_pagetype", this.pageType);
        arg3.putString("_wxwebpageobject_url", this.url);
    }

    public int type() {
        return this.type;
    }

    public void unserialize(Bundle arg2) {
        this.tid = arg2.getInt("_wxemojisharedobject_tid");
        this.title = arg2.getString("_wxemojisharedobject_title");
        this.desc = arg2.getString("_wxemojisharedobject_desc");
        this.iconUrl = arg2.getString("_wxemojisharedobject_iconurl");
        this.secondUrl = arg2.getString("_wxemojisharedobject_secondurl");
        this.pageType = arg2.getInt("_wxemojisharedobject_pagetype");
        this.url = arg2.getString("_wxwebpageobject_url");
    }
}

